{:W('Nav',array('name'=>'节点列表','act'=>'添加节点','URL'=>'addNode'))}
<link href="__PUBLIC__/Css/node.css" rel="stylesheet"/>
<!-- 订单列表 -->
<div id="wrap">
<a href="addNode" class="add-app">添加应用</a>
        <foreach name="nodeArr" item="v">
            <div class="app">
                <p>
                    <if condition="$v.status ">
                        <strong >{$v.title}</strong>
                        <else/>
                        <strong style="color: #c9c9c9;">{$v.title}</strong>
                    </if>

                    [<a href="addNode?pid={$v.id}&level=2">添加控制器</a>]
                    [<a href="addNode?id={$v.id}">修改</a>]
                    [<a href="runDeleteNode?id={$v.id}">删除</a>]
                </p>
                <foreach name="v.child" item="val">
                    <dl>
                       <dt>
                           <if condition="$val.status ">
                               <strong >{$val.title}</strong>
                               <else/>
                               <strong style="color: #c9c9c9;">{$val.title}</strong>
                           </if>
                           [<a href="addNode?pid={$val.id}&level=3">添加方法</a>]
                           [<a href="addNode?id={$val.id}">修改</a>]
                           [<a href="runDeleteNode?id={$val.id}">删除</a>]
                       </dt>
                        <foreach name="val.child" item="value">
                            <dd>
                                <if condition="$value.status ">
                                    <strong >{$value.title}</strong>
                                    <else/>
                                    <strong style="color: #c9c9c9;">{$value.title}</strong>
                                </if>
                                [<a href="addNode?id={$value.id}">修改</a>]
                                [<a href="runDeleteNode?id={$value.id}">删除</a>]
                            </dd>
                        </foreach>
                    </dl>
                </foreach>
            </div>
        </foreach>


    <!-- 分页 -->

    <div class="mask-black" id="Mask" style="display:none"></div>
    <!--遮罩-->
</div>

<script language="JavaScript">
    function sure($id) {
        var xmlhttp = new XMLHttpRequest();
        var act = "{:U(GROUP_NAME.'/Order/sureOrder')}";
        xmlhttp.open("POST", act, false);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send("id=" + $id);
        if (xmlhttp.responseText == true) {
            document.getElementsByName($id)[0].innerText = '已确认';
            document.getElementsByName('sure_' + $id)[0].innerText = ' ';
        } else {
            alert('传输错误，请稍后重试');
        }
    }
</script>


</body>
</html>